<template>
    <div class="navbar">
        <div
            style="display: flex; justify-content: center; padding: 10px; background-color: #f2f2f2; border-radius: 5px;">
            <RouterLink to="/register"> <button> 注册 </button></RouterLink>
            <RouterLink to="/login"> <button> 登录</button></RouterLink>
        </div>


    </div>
</template>

<script>
import { RouterLink, RouterView } from 'vue-router';
</script>

<style scoped>
.navbar {
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    background-color: #f1f1f1;
    z-index: 1000;
}

.navbar-icon {
    position: relative;
    cursor: pointer;
}

.dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 270px;
    background-color: #f0f8ff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    z-index: 1000;
}

.dropdown-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

.dropdown-content {
    display: flex;
    align-items: center;
}

.dropdown-info {
    display: flex;
}

.dropdown-info img {
    margin-right: 10px;
    border-radius: 50%;
}

.dropdown-name {
    display: flex;
    flex-direction: column;
}

.dropdown-name h3 {
    color: #333;
}

.dropdown-role {
    margin-top: 10px;
    color: #666;
}

.dropdown-links {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.dropdown-links .navbar-link {
    margin-bottom: 0;
}

.dropdown-link {
    text-decoration: none;
    color: #007bff;
    margin-bottom: 5px;
}

.dropdown-link:hover {
    color: #0056b3;
}

.out {
    text-align: center;
}

.nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-item:hover {
    background-color: #f0f8ff;
}

.close-btn {
    margin-left: 10px;
    background-color: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.hidden {
    display: none;
}

.nav-item.active {
    background-color: #9d8d8d49;
    font-weight: bold;
}

.nav-item-left {
    display: flex;
    justify-content: flex-start;
    /* 从左边开始排列 */
    margin-left: 30px;
    /* 距离最左边的距离为30px */
}

.nav-item {
    /* 其他样式保持不变 */
    margin-right: 10px;
    /* 可以添加一些外边距，使导航项之间有间隔 */
}
</style>
